package com.ocom.common.request.simple.unicom;


import lombok.Data;
import org.codehaus.jackson.annotate.JsonIgnore;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
public class DevicesDataRequest implements Serializable {

	private String deviceKey;
	private String productKey;
	private String messageType = "data";

	private Data data = new Data();
	@JsonIgnore
	private Events events = new Events();
	@JsonIgnore
	private ConsEvent consEvent = new ConsEvent();
	@JsonIgnore
	private Value value = new Value();

	@lombok.Data
	public class Data{
		private Events events;
	}

	@lombok.Data
	public class Events{
		private ConsEvent consEvent;
	}

	@lombok.Data
	public class ConsEvent{
		private String eventType;
		private Long time = new Date().getTime();
		private Value value;

	}

	@lombok.Data
	public class Value{
		private String machNo;
		private String orderNo;
		private String consTime;
		private Integer consState;
		private Long consMoney;
		private String describe;
	}

}
